<script setup>
// 按需导入
import { useCounterStore } from '@/stores/counter'
// 通过 useCounterStore 获得 counterStore
const counterStore = useCounterStore()
</script>

<template>
    <h1>HomeDefault</h1>
    <div>
        <p>value: {{ counterStore.value }}</p>
        <p>count: {{ counterStore.count }}</p>
        <p>double: {{ counterStore.double }}</p>
        <a-button type="primary" @click="counterStore.increment">点我试试</a-button>
    </div>
</template>